//
//  FoodViewController.m
//  MyProject
//
//  Created by dllo on 15/11/6.
//  Copyright (c) 2015年 蓝鸥0825. All rights reserved.
//


//      最 in活动里的三级页面
#import "FoodViewController.h"
#import "modelFood.h"

#import "WHZAfnetWorking.h"
#import "NetWork.h"

#define WIDTH self.view.frame.size.width
#define HEIGHT self.view.frame.size.height

@interface FoodViewController ()

@end

@implementation FoodViewController


//      视图将要出现
- (void)viewWillAppear:(BOOL)animated{
    
    [NetWork netWork:self];
    
}


- (void)viewDidLoad {
    
    [super viewDidLoad];
    self.footView = [[FootView alloc] initWithFrame:CGRectMake(0, 0, WIDTH, HEIGHT)];
    [self.view addSubview:self.footView];
    [self createData];
    
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
}


- (void)createData{
    
    [WHZAfnetWorking GETJRAfnNetworkingWithUrl:self.str WithParameters:nil Block:^(id result) {
        
        NSMutableDictionary *dic = [NSMutableDictionary dictionary];
        dic = result;
        self.array = [modelFood baseModelByArr:dic[@"topic_list"]];
        self.footView.array = self.array;
        [self.footView.table reloadData];
        
    }];
    
    
}




@end









